package com.xyz.rok.tools.mapper;

import com.xyz.rok.tools.model.ApplyTitle;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ApplyTitleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ApplyTitle record);

    int insertSelective(ApplyTitle record);

    ApplyTitle selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ApplyTitle record);

    int updateByPrimaryKey(ApplyTitle record);

    ApplyTitle selectByServerIdAndUserId(@Param("serverId") Integer serverId, @Param("userId") Long userId);

    ApplyTitle selectByUserId(@Param("userId") Long userId);

    List<ApplyTitle> selectByServerId(Integer serverId);

    ApplyTitle getFirstTitle(@Param("title") Integer title, @Param("serverId") Integer serverId);

    int getCountByServerId(@Param("serverId") Integer serverId);
}